package com.ushine.design.design.c_behavioral_pattern.g_observer.b_example;

public class ConcreteAllyContolCenter extends AllyControlCenter {

    public ConcreteAllyContolCenter(String allyName) {
        System.out.println(allyName + "组建战队成功！");
        System.out.println("------------------------");
        this.allyName = allyName;
    }

    @Override
    public void notifyObserver(String name) {
        System.out.println(this.allyName + "战队紧急通知，盟友" + name + "遭受敌人攻击！");
        for (Observer observer : players) {
            observer.help();
        }
    }

}
